package com.qdlc.p2p.dal.dto;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;

/**
 * 加息券产生待收差额实体
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "additional_up_rate_collection")
public class UpRateCollection {

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** 借款id */
    private long borrowId;

    /** 投资人id */
    private long userId;

    /** 待收id */
    private long collectionId;

    /** 借款期数 */
    private int period;

    /** 原始利息 */
    private double oldInterest;

    /** 加息应还利息 */
    private double newInterest;

    /** 利息差额 */
    private double differenceInterest;

    /** 平台实付金额 */
    private double webPayMoney;

    /** 状态：0：未还，1：已还 */
    public int status;

    /** 待还时间 */
    private Date repaymentTime;

    /** 实际发放时间 */
    public Date repaymentYesTime;

    /**
     * 获取主键id
     *
     * @return 主键id
     */
    public long getId() {
        return id;
    }

    /**
     * 设置主键id
     *
     * @param id 要设置的主键id
     */
    public void setId(long id) {
        this.id = id;
    }


    public long getBorrowId() {
        return borrowId;
    }

    public void setBorrowId(long borrowId) {
        this.borrowId = borrowId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    /**
     * 获取借款期数
     *
     * @return 借款期数
     */
    public int getPeriod() {
        return period;
    }

    /**
     * 设置借款期数
     *
     * @param period 要设置的借款期数
     */
    public void setPeriod(int period) {
        this.period = period;
    }

    /**
     * 获取原始利息
     *
     * @return 原始利息
     */
    public double getOldInterest() {
        return oldInterest;
    }

    /**
     * 设置原始利息
     *
     * @param oldInterest 要设置的原始利息
     */
    public void setOldInterest(double oldInterest) {
        this.oldInterest = oldInterest;
    }

    /**
     * 获取加息应还利息
     *
     * @return 加息应还利息
     */
    public double getNewInterest() {
        return newInterest;
    }

    /**
     * 设置加息应还利息
     *
     * @param newInterest 要设置的加息应还利息
     */
    public void setNewInterest(double newInterest) {
        this.newInterest = newInterest;
    }

    /**
     * 获取利息差额
     *
     * @return 利息差额
     */
    public double getDifferenceInterest() {
        return differenceInterest;
    }

    /**
     * 设置利息差额
     *
     * @param differenceInterest 要设置的利息差额
     */
    public void setDifferenceInterest(double differenceInterest) {
        this.differenceInterest = differenceInterest;
    }

    public double getWebPayMoney() {
        return webPayMoney;
    }

    public void setWebPayMoney(double webPayMoney) {
        this.webPayMoney = webPayMoney;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public long getCollectionId() {
        return collectionId;
    }

    public void setCollectionId(long collectionId) {
        this.collectionId = collectionId;
    }

    public Date getRepaymentYesTime() {
        return repaymentYesTime;
    }

    public void setRepaymentYesTime(Date repaymentYesTime) {
        this.repaymentYesTime = repaymentYesTime;
    }

    public Date getRepaymentTime() {
        return repaymentTime;
    }

    public void setRepaymentTime(Date repaymentTime) {
        this.repaymentTime = repaymentTime;
    }
}


